<?
	// permohonan cuti khusus
	include("../lib/config.php");
	$nik 		= $HTTP_GET_VARS['nik'];
	$jenis_cuti = $HTTP_GET_VARS['jenis_cuti'];
	$no			= $HTTP_GET_VARS['no'];
	$tahun		= $HTTP_GET_VARS['tahun'];
	
	$sql = mssql_query("WITH limit AS (SELECT ROW_NUMBER() OVER (ORDER BY TglAwal) No, * FROM VCuti WHERE NIK='$nik' AND year(tgl_awal)='$tahun' AND kode_cuti='".$jenis_cuti."' ) SELECT * FROM limit ",$conn);
	$row = mssql_fetch_array($sql);
	
	// get jabatan
	$sdet = mssql_query("select A.NIK,B.Nama,Uraian,AreaCode, CONVERT(CHAR(12), tgl_masuk, 103) tanggal from karyawanstatus A, mstjabatan B, MstSO C where A.jabatan=B.kode AND A.kode_so=C.kode_so",$conn);
	$rdet = mssql_fetch_array($sdet);
?>
<style type="text/css">
	body,table{
		font-size:11px;
		font-family:Verdana, Arial, Helvetica, sans-serif;
	}
</style>
<title>Permohonan Cuti Khusus</title>
<table width="80%" align="center">
 <tr>
  <td align="center"><b><h2>PERMOHONAN CUTI KHUSUS</h2></b></td>
 </tr>
 <tr>
  <td>&nbsp;</td>
 </tr>
 <tr>
  <td>Dengan ini saya,
   <table align="left" border="0">
    <tr>
     <td width="100">Nama:</td>
     <td width="200"><?=$row[Nama]?></td>
    </tr>
    <tr>
     <td>NIK:</td>
     <td><?=$row[NIK]?></td>
    </tr>
    <tr>
     <td>Jabatan:</td>
     <td><?=$rdet[Nama]?></td>
    </tr>    
    <tr>
     <td>Unit Kerja:</td>
     <td><?=$rdet[AreaCode]." - ".$rdet[Uraian]?></td>
    </tr> 
    <tr>
     <td>Tanggal Masuk:</td>
     <td><?=$rdet[tanggal]?></td>
    </tr> 
   </table>
  </td>
 </tr>
 <tr>
  <td>&nbsp;</td>
 </tr>
 <tr>
  <td>Mengajukan permohonan cuti :<Br /><br />
  <div align="center">
  Cuti Tahunan mulai tanggal <?=$row[TglAwal]?> s/d <?=$row[TglAkhir]?> ( <?=$row[jml_cuti]?> hari kerja).<br /><br />
  </div>
  Alamat selama cuti berlangsung <br />
  ............................................................................................................................<Br />
  ............................................................................................................................<br />
  ............................................................................................................................<Br />
  ............................................................................................................................<br />
  ............................................................................................................................<Br />
  ............................................................................................................................<br />
<br /><br /><br /><br /><br />
	<table width="80%" cellpadding="0" cellspacing="0" align="center">
 	 <tr>
  	  <td width="80%">Menyetujui,<br />Direksi/GM/DGM/Ka.Cab/Ka. SBU/Ka. Div</td>
  	  <td width="20%">Jakarta, <?=date("d/m/Y")?><br />Pegawai ybs.</td>
 	 </tr>
     <tR height="150">
      <td valign="bottom">
      _________________________________<br />
      NIK :
      </td>
      <td valign="bottom">
      <u><?=$row[Nama]?></u><br />
      NIK: <?=$row[NIK]?>
      </td>
     </tR>
     <tr>
      <td colspan="2"><bR /><bR />
      Catatan Direksi/GM/DGM/Ka.Cab/Ka. SBU/Ka. Div<br /><br />
  ............................................................................................................................<Br />
  ............................................................................................................................<br />
  ............................................................................................................................<Br />
  ............................................................................................................................<br />
      
      </td>
     </tr>
	</table>
  </td>
 </tr>
 <tr>
  <td colspan="3"><br /><br />
  <fieldset>
   <legend>DIISI OLEH DIVISI SDM</legend>
   <table width="100%">
    <tr>
     <td colspan="2">Hak Cuti</td>
    </tr>
    <tr>
     <td valign="top">
      <table>
       <tr>
        <td rowspan="3" valign="top"><input type="checkbox" /></td>
        <td>Cuti Tahunan (_______ - ________)</td>
        <td>: ... hari.</td>
       </tr>
       <tr>
        <td>Telah Diambil</td>
        <td>: ... hari.</td>
       </tr>
       <tr>
        <td>Sisa Cuti Tahunan per ________</td>
        <td>: ... hari.</td>
       </tr>
       <tr>
        <td rowspan="3" valign="top"><input type="checkbox" /></td>
        <td>Cuti Besar (_______ - ________)</td>
        <td>: ... hari.</td>
       </tr>
       <tr>
        <td>Telah Diambil</td>
        <td>: ... hari.</td>
       </tr>
       <tr>
        <td>Sisa Cuti Tahunan per ________</td>
        <td>: ... hari.</td>
       </tr>
       <tr>
        <td rowspan="3" valign="top"><input type="checkbox" /></td>
        <td>Lainnya</td>
        <td>: ... hari.</td>
       </tr>	
      </table><br /><br />
      <small>
      <i>
      * Isi dengan tanda X, sesuai dengan pilihan<br />
      * Coret yang tidak perlu
      </i>
      </small>
     </td>
     <td>
      <fieldset><legend>Catatan &amp; Paraf Adm Kepegawaian</legend>
      <table width="100%">
      <tr height="200">
       <td height="200"><br /><br /><br /><br /></td>
      </tr>
      </table>
      _______________________________<br />
      NIK:
      </fieldset>
     </td>
    </tr>
   </table>
  </fieldset>
  </td>
 </tr>
</table>